package com.example.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @author 紫煦桉
 */
public class MagazineMessage extends AbstractToString {
    private Integer magazineNo;
    private String magazineName;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date magazineDate;
    private AreaMessage areaMessage;

    public MagazineMessage() {
    }

    public MagazineMessage(Integer magazineNo) {
        this.magazineNo = magazineNo;
    }

    public MagazineMessage(Integer magazineNo, String magazineName, Date magazineDate) {
        this.magazineNo = magazineNo;
        this.magazineName = magazineName;
        this.magazineDate = magazineDate;
    }

    public MagazineMessage(Integer magazineNo, String magazineName, Date magazineDate, AreaMessage areaMessage) {
        this.magazineNo = magazineNo;
        this.magazineName = magazineName;
        this.magazineDate = magazineDate;
        this.areaMessage = areaMessage;
    }

    public Integer getMagazineNo() {
        return magazineNo;
    }

    public void setMagazineNo(Integer magazineNo) {
        this.magazineNo = magazineNo;
    }

    public String getMagazineName() {
        return magazineName;
    }

    public void setMagazineName(String magazineName) {
        this.magazineName = magazineName;
    }

    public Date getMagazineDate() {
        return magazineDate;
    }

    public void setMagazineDate(Date magazineDate) {
        this.magazineDate = magazineDate;
    }

    public AreaMessage getAreaMessage() {
        return areaMessage;
    }

    public void setAreaMessage(AreaMessage areaMessage) {
        this.areaMessage = areaMessage;
    }
}
